package acm.蓝桥13;

import java.util.Scanner;

public class G李白大酒dp {
    /**
     * 状态定义：dp[i][j][k]，李白在遇了i,次店,j次花，剩余k斗时的情况
     * 操作：
     *      遇一次店，dp[i][j][k]=dp[i-1][j][k/2],k%2==0&&i>0
     *      遇一次话：dp[i][j][k]=dp[i][j-1][k-1],j>0&&k>0
     *  边界：dp[i][0][k]=0
     *      dp[0][i][k],i==k,v=1,i!=k,v=0
     */
    static int mod=1000000007;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int i = sc.nextInt();
        int j = sc.nextInt();
        System.out.println(dpFun(i,j));
    }

    public static long dpFun(int n, int m) {
        int[][][] dp = new int[n + 1][m + 1][m + 1];
        dp[0][1][1]=1;
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= m; j++) {
                for (int k = 1; k <= m; k++) {
                    if (k > j) {
                        dp[i][j][k] = 0;
                        break;
                    }
                    if (k*2<=j){
                        dp[i][j][k]+=dp[i-1][j][k*2];
                    }
                    dp[i][j][k]+=dp[i][j-1][k-1];
                    dp[i][j][k]%=mod;
                }
            }
        }
        return dp[n][m - 1][1];
    }
}
